Skip to content

Conversation

@koushiro
Copy link
Contributor

The current APIs of Registry does not allow me to change the prefix and labels of a Registry after it's constructed.

Breaking Changes:

  • change fn with_prefix(prefix: ...) -> Self => fn with_prefix(mut self, prefix: ...) -> Self
  • change fn with_labels(labels: ...) -> Self => fn with_labels(mut self, labels: ...) -> Self
  • remove fn with_prefix_and_labels(prefix: ..., labels: ...) -> Self

@koushiro
Copy link
Contributor Author

koushiro commented Nov 10, 2024

BTW, I think the sub_registry part is not very useful, and it might be better to remove these sub_registry_* APIs to keep the Registry APIs simple (as long as the prefix and labels field of the registry are exposed, downstream users can implement these functionalities by themselves)

**Breaking Changes**:

- change `fn with_prefix(prefix: ...) -> Self` => `fn with_prefix(mut self, prefix: ...) -> Self`
- change `fn with_labels(labels: ...) -> Self` => `fn with_labels(mut self, labels: ...) -> Self`
- remove `fn with_prefix_and_labels(prefix: ..., labels: ...) -> Self`

Signed-off-by: koushiro <[email protected]>
@koushiro koushiro closed this Dec 27, 2024
@koushiro koushiro deleted the refactor-registry-constructor branch December 27, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant